#ifndef LOG_DECODE_MESSAGE_H
#define LOG_DECODE_MESSAGE_H

#include <QtCore/QDateTime>
#include "logmanager/log_global.h"

namespace smsrouter {

class LogDecodedMessage {
public:
  LogDecodedMessage(quint32 id,
                    quint64 date,
                    smslog::LogLevel log_level,
                    int cls,
                    int obj,
                    const QString &message) :
    id(id),
    date(date),
    log_level(log_level),
    cls(cls),
    obj(obj),
    message(message) {

  }

  quint32 id;
  quint64 date;
  smslog::LogLevel log_level;
  int cls;
  int obj;
  QString message;
};

class LogDecodedMessages {
public:
  LogDecodedMessages() : num_all_messages(0) {

  }

  LogDecodedMessages(const LogDecodedMessages &p) :
    num_all_messages(p.num_all_messages),
    messages(p.messages) {

  }

  ~LogDecodedMessages() {
    qDeleteAll(messages);
    messages.clear();
    num_all_messages = 0;
  }

  int num_all_messages;
  QList<LogDecodedMessage *> messages;
};

} // namespace smsrouter

#endif // LOG_DECODE_MESSAGE_H
